home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / hc / pcalc07.sit / pCalc V0.7 / card_2884.txt < prev    next >
Text File  |  1988-11-14  |  17KB  |  747 lines

  1. -- card: 2884 from stack: in.7
  2. -- bmap block id: 3651
  3. -- flags: 0000
  4. -- background id: 2793
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openCard
  8.   global reg1
  9.   put "0" into reg1
  10.   put "0" into card field "display"
  11.   put empty into card field "operator"
  12. end openCard
  13.  
  14.  
  15.  
  16. -- part 1 (button)
  17. -- low flags: 00
  18. -- high flags: A003
  19. -- rect: left=351 top=178 right=201 bottom=378
  20. -- title width / last selected line: 0
  21. -- icon id / first selected line: 0 / 0
  22. -- text alignment: 1
  23. -- font id: 0
  24. -- text size: 12
  25. -- style flags: 0
  26. -- line height: 16
  27. -- part name: C
  28. ----- HyperTalk script -----
  29. on mouseUp
  30.   global reg5, reg6
  31.   set lockMessages to true
  32.   put "0" into card field 1
  33.   put empty into card field 3
  34.   put empty into reg5
  35.   put empty into reg6
  36. end mouseUp
  37.  
  38.  
  39.  
  40. -- part 2 (button)
  41. -- low flags: 00
  42. -- high flags: A003
  43. -- rect: left=351 top=205 right=228 bottom=378
  44. -- title width / last selected line: 0
  45. -- icon id / first selected line: 0 / 0
  46. -- text alignment: 1
  47. -- font id: 0
  48. -- text size: 12
  49. -- style flags: 0
  50. -- line height: 16
  51. -- part name: 7
  52. ----- HyperTalk script -----
  53. on mouseUp
  54.   pass mouseUp
  55. end mouseUp
  56.  
  57.  
  58. -- part 3 (button)
  59. -- low flags: 00
  60. -- high flags: A003
  61. -- rect: left=351 top=232 right=255 bottom=378
  62. -- title width / last selected line: 0
  63. -- icon id / first selected line: 0 / 0
  64. -- text alignment: 1
  65. -- font id: 0
  66. -- text size: 12
  67. -- style flags: 0
  68. -- line height: 16
  69. -- part name: 4
  70. ----- HyperTalk script -----
  71. on mouseUp
  72.   pass mouseUp
  73. end mouseUp
  74.  
  75.  
  76. -- part 4 (button)
  77. -- low flags: 00
  78. -- high flags: A003
  79. -- rect: left=351 top=259 right=282 bottom=378
  80. -- title width / last selected line: 0
  81. -- icon id / first selected line: 0 / 0
  82. -- text alignment: 1
  83. -- font id: 0
  84. -- text size: 12
  85. -- style flags: 0
  86. -- line height: 16
  87. -- part name: 1
  88. ----- HyperTalk script -----
  89. on mouseUp
  90.   pass mouseUp
  91. end mouseUp
  92.  
  93.  
  94.  
  95. -- part 5 (button)
  96. -- low flags: 00
  97. -- high flags: A003
  98. -- rect: left=382 top=259 right=282 bottom=409
  99. -- title width / last selected line: 0
  100. -- icon id / first selected line: 0 / 0
  101. -- text alignment: 1
  102. -- font id: 0
  103. -- text size: 12
  104. -- style flags: 0
  105. -- line height: 16
  106. -- part name: 2
  107. ----- HyperTalk script -----
  108. on mouseUp
  109.   pass mouseUp
  110. end mouseUp
  111.  
  112.  
  113.  
  114. -- part 6 (button)
  115. -- low flags: 00
  116. -- high flags: A003
  117. -- rect: left=382 top=232 right=255 bottom=409
  118. -- title width / last selected line: 0
  119. -- icon id / first selected line: 0 / 0
  120. -- text alignment: 1
  121. -- font id: 0
  122. -- text size: 12
  123. -- style flags: 0
  124. -- line height: 16
  125. -- part name: 5
  126. ----- HyperTalk script -----
  127. on mouseUp
  128.   pass mouseUp
  129. end mouseUp
  130.  
  131.  
  132. -- part 7 (button)
  133. -- low flags: 00
  134. -- high flags: A003
  135. -- rect: left=382 top=205 right=228 bottom=409
  136. -- title width / last selected line: 0
  137. -- icon id / first selected line: 0 / 0
  138. -- text alignment: 1
  139. -- font id: 0
  140. -- text size: 12
  141. -- style flags: 0
  142. -- line height: 16
  143. -- part name: 8
  144. ----- HyperTalk script -----
  145. on mouseUp
  146.   pass mouseUp
  147. end mouseUp
  148.  
  149.  
  150. -- part 8 (button)
  151. -- low flags: 00
  152. -- high flags: A003
  153. -- rect: left=382 top=178 right=201 bottom=409
  154. -- title width / last selected line: 0
  155. -- icon id / first selected line: 0 / 0
  156. -- text alignment: 1
  157. -- font id: 0
  158. -- text size: 12
  159. -- style flags: 0
  160. -- line height: 16
  161. -- part name: -
  162. ----- HyperTalk script -----
  163. on mouseUp
  164.   put "-" into card field 3
  165. end mouseUp
  166.  
  167.  
  168.  
  169. -- part 9 (button)
  170. -- low flags: 00
  171. -- high flags: A003
  172. -- rect: left=413 top=178 right=201 bottom=440
  173. -- title width / last selected line: 0
  174. -- icon id / first selected line: 0 / 0
  175. -- text alignment: 1
  176. -- font id: 0
  177. -- text size: 12
  178. -- style flags: 0
  179. -- line height: 16
  180. -- part name: +
  181. ----- HyperTalk script -----
  182. on mouseUp
  183.   put "+" into card field 3
  184. end mouseUp
  185.  
  186.  
  187.  
  188. -- part 10 (button)
  189. -- low flags: 00
  190. -- high flags: A003
  191. -- rect: left=444 top=178 right=201 bottom=471
  192. -- title width / last selected line: 0
  193. -- icon id / first selected line: 0 / 0
  194. -- text alignment: 1
  195. -- font id: 0
  196. -- text size: 12
  197. -- style flags: 0
  198. -- line height: 16
  199. -- part name: *
  200. ----- HyperTalk script -----
  201. on mouseUp
  202.   put "*" into card field 3
  203. end mouseUp
  204.  
  205.  
  206.  
  207. -- part 11 (button)
  208. -- low flags: 00
  209. -- high flags: A003
  210. -- rect: left=444 top=205 right=228 bottom=471
  211. -- title width / last selected line: 0
  212. -- icon id / first selected line: 0 / 0
  213. -- text alignment: 1
  214. -- font id: 0
  215. -- text size: 12
  216. -- style flags: 0
  217. -- line height: 16
  218. -- part name: /
  219. ----- HyperTalk script -----
  220. on mouseUp
  221.   put "/" into card field 3
  222. end mouseUp
  223.  
  224.  
  225.  
  226. -- part 12 (button)
  227. -- low flags: 00
  228. -- high flags: A003
  229. -- rect: left=444 top=232 right=255 bottom=471
  230. -- title width / last selected line: 0
  231. -- icon id / first selected line: 0 / 0
  232. -- text alignment: 1
  233. -- font id: 0
  234. -- text size: 12
  235. -- style flags: 0
  236. -- line height: 16
  237. -- part name: HC
  238. ----- HyperTalk script -----
  239. on mouseUp
  240.   show card field 6
  241. end mouseUp
  242.  
  243.  
  244.  
  245. -- part 13 (button)
  246. -- low flags: 00
  247. -- high flags: A003
  248. -- rect: left=413 top=232 right=255 bottom=440
  249. -- title width / last selected line: 0
  250. -- icon id / first selected line: 0 / 0
  251. -- text alignment: 1
  252. -- font id: 0
  253. -- text size: 12
  254. -- style flags: 0
  255. -- line height: 16
  256. -- part name: 6
  257. ----- HyperTalk script -----
  258. on mouseUp
  259.   pass mouseUp
  260. end mouseUp
  261.  
  262.  
  263. -- part 14 (button)
  264. -- low flags: 00
  265. -- high flags: A003
  266. -- rect: left=413 top=205 right=228 bottom=440
  267. -- title width / last selected line: 0
  268. -- icon id / first selected line: 0 / 0
  269. -- text alignment: 1
  270. -- font id: 0
  271. -- text size: 12
  272. -- style flags: 0
  273. -- line height: 16
  274. -- part name: 9
  275. ----- HyperTalk script -----
  276. on mouseUp
  277.   pass mouseUp
  278. end mouseUp
  279.  
  280.  
  281. -- part 15 (button)
  282. -- low flags: 00
  283. -- high flags: A003
  284. -- rect: left=413 top=259 right=282 bottom=440
  285. -- title width / last selected line: 0
  286. -- icon id / first selected line: 0 / 0
  287. -- text alignment: 1
  288. -- font id: 0
  289. -- text size: 12
  290. -- style flags: 0
  291. -- line height: 16
  292. -- part name: 3
  293. ----- HyperTalk script -----
  294. on mouseUp
  295.   pass mouseUp
  296. end mouseUp
  297.  
  298.  
  299.  
  300. -- part 16 (button)
  301. -- low flags: 00
  302. -- high flags: A003
  303. -- rect: left=413 top=286 right=309 bottom=440
  304. -- title width / last selected line: 0
  305. -- icon id / first selected line: 0 / 0
  306. -- text alignment: 1
  307. -- font id: 0
  308. -- text size: 12
  309. -- style flags: 0
  310. -- line height: 16
  311. -- part name: .
  312. ----- HyperTalk script -----
  313. on mouseUp
  314.   pass mouseUp
  315. end mouseUp
  316.  
  317.  
  318. -- part 19 (field)
  319. -- low flags: 00
  320. -- high flags: 0000
  321. -- rect: left=351 top=151 right=168 bottom=455
  322. -- title width / last selected line: 0
  323. -- icon id / first selected line: 0 / 0
  324. -- text alignment: 65535
  325. -- font id: 3
  326. -- text size: 12
  327. -- style flags: 0
  328. -- line height: 16
  329. -- part name: display
  330.  
  331.  
  332. -- part 17 (button)
  333. -- low flags: 00
  334. -- high flags: A003
  335. -- rect: left=444 top=259 right=309 bottom=471
  336. -- title width / last selected line: 0
  337. -- icon id / first selected line: 0 / 0
  338. -- text alignment: 1
  339. -- font id: 0
  340. -- text size: 12
  341. -- style flags: 0
  342. -- line height: 16
  343. -- part name: =
  344. ----- HyperTalk script -----
  345. on mouseUp
  346.   global reg5
  347.   set lockScreen to true
  348.   if first character of card field "display" = 0 then play boing
  349.   else
  350.     put reg5 & card field "display" into reg5
  351.     put return & card field "display" && "=" after last line of card field "tape"
  352.   end if
  353.   put the value of reg5 into reg5
  354.   put the value of reg5 into card field "display"
  355.   put "T" into card field "operator"
  356.   put return & reg5 && "T" after last line of card field "tape"
  357.   put empty into reg5
  358.   set lockScreen to false
  359. end mouseUp
  360.  
  361.  
  362.  
  363. -- part 18 (button)
  364. -- low flags: 00
  365. -- high flags: A003
  366. -- rect: left=351 top=286 right=309 bottom=409
  367. -- title width / last selected line: 0
  368. -- icon id / first selected line: 0 / 0
  369. -- text alignment: 1
  370. -- font id: 0
  371. -- text size: 12
  372. -- style flags: 0
  373. -- line height: 16
  374. -- part name: 0
  375. ----- HyperTalk script -----
  376. on mouseUp
  377.   pass mouseUp
  378. end mouseUp
  379.  
  380.  
  381. -- part 20 (field)
  382. -- low flags: 00
  383. -- high flags: 0007
  384. -- rect: left=26 top=40 right=320 bottom=159
  385. -- title width / last selected line: 0
  386. -- icon id / first selected line: 0 / 0
  387. -- text alignment: 65535
  388. -- font id: 4
  389. -- text size: 9
  390. -- style flags: 0
  391. -- line height: 12
  392. -- part name: tape
  393.  
  394.  
  395. -- part 21 (button)
  396. -- low flags: 00
  397. -- high flags: 2000
  398. -- rect: left=289 top=205 right=228 bottom=347
  399. -- title width / last selected line: 0
  400. -- icon id / first selected line: 0 / 0
  401. -- text alignment: 1
  402. -- font id: 0
  403. -- text size: 12
  404. -- style flags: 0
  405. -- line height: 16
  406. -- part name: dateTime
  407. ----- HyperTalk script -----
  408. on mouseUp
  409.   put return & the date && "-" && the time after last line of card field "tape"
  410. end mouseUp
  411.  
  412.  
  413.  
  414. -- part 22 (button)
  415. -- low flags: 80
  416. -- high flags: 8004
  417. -- rect: left=212 top=232 right=249 bottom=285
  418. -- title width / last selected line: 0
  419. -- icon id / first selected line: 0 / 0
  420. -- text alignment: 1
  421. -- font id: 0
  422. -- text size: 12
  423. -- style flags: 0
  424. -- line height: 16
  425. -- part name: clearTape
  426. ----- HyperTalk script -----
  427. on mouseUp
  428.   put "" into card field "tape"
  429. end mouseUp
  430.  
  431.  
  432.  
  433. -- part 23 (field)
  434. -- low flags: 00
  435. -- high flags: 0000
  436. -- rect: left=451 top=151 right=168 bottom=463
  437. -- title width / last selected line: 0
  438. -- icon id / first selected line: 0 / 0
  439. -- text alignment: 0
  440. -- font id: 3
  441. -- text size: 12
  442. -- style flags: 0
  443. -- line height: 16
  444. -- part name: operator
  445.  
  446.  
  447. -- part 26 (button)
  448. -- low flags: 00
  449. -- high flags: 2003
  450. -- rect: left=289 top=286 right=309 bottom=316
  451. -- title width / last selected line: 0
  452. -- icon id / first selected line: 21847 / 21847
  453. -- text alignment: 1
  454. -- font id: 0
  455. -- text size: 12
  456. -- style flags: 0
  457. -- line height: 16
  458. -- part name: home
  459. ----- HyperTalk script -----
  460. on mouseUp
  461.   visual effect dissolve to black
  462.   go home
  463. end mouseUp
  464.  
  465.  
  466.  
  467. -- part 28 (button)
  468. -- low flags: 00
  469. -- high flags: A000
  470. -- rect: left=289 top=259 right=282 bottom=316
  471. -- title width / last selected line: 0
  472. -- icon id / first selected line: 0 / 0
  473. -- text alignment: 1
  474. -- font id: 0
  475. -- text size: 12
  476. -- style flags: 0
  477. -- line height: 16
  478. -- part name: 
  479. ----- HyperTalk script -----
  480. on mouseUp
  481.   ask "Enter the problem you want to solve:"
  482.   if it <> empty then
  483.     put return & it && "=" after last line in card field "tape"
  484.     put return & value of it && "T" after last line in card field "tape"
  485.   else
  486.     play boing
  487.   end if
  488. end mouseUp
  489.  
  490.  
  491. -- part 31 (button)
  492. -- low flags: 00
  493. -- high flags: A003
  494. -- rect: left=320 top=286 right=309 bottom=347
  495. -- title width / last selected line: 0
  496. -- icon id / first selected line: 0 / 0
  497. -- text alignment: 1
  498. -- font id: 0
  499. -- text size: 12
  500. -- style flags: 0
  501. -- line height: 16
  502. -- part name: off
  503. ----- HyperTalk script -----
  504. on mouseUp
  505.   answer "Do you really want to quit HyperCard?" with "OK" or "NEVER"
  506.   if it = "OK" then doMenu "Quit HyperCard"
  507. end mouseUp
  508.  
  509.  
  510. -- part 37 (button)
  511. -- low flags: 80
  512. -- high flags: A004
  513. -- rect: left=212 top=211 right=228 bottom=285
  514. -- title width / last selected line: 0
  515. -- icon id / first selected line: 0 / 0
  516. -- text alignment: 1
  517. -- font id: 0
  518. -- text size: 12
  519. -- style flags: 0
  520. -- line height: 16
  521. -- part name: saveTape
  522. ----- HyperTalk script -----
  523. on mouseUp
  524.   global tape,keyword
  525.   ask "KeyWords:"
  526.   put it into keyword
  527.   get card field "tape"
  528.   put it into tape
  529.   go to last card
  530.   doMenu New Card
  531.   put tape into field 2
  532.   put keyword into field 1
  533. end mouseUp
  534.  
  535.  
  536.  
  537. -- part 39 (button)
  538. -- low flags: 00
  539. -- high flags: A003
  540. -- rect: left=289 top=232 right=255 bottom=347
  541. -- title width / last selected line: 0
  542. -- icon id / first selected line: 0 / 0
  543. -- text alignment: 1
  544. -- font id: 0
  545. -- text size: 12
  546. -- style flags: 0
  547. -- line height: 16
  548. -- part name: tape
  549. ----- HyperTalk script -----
  550. on mouseUp
  551.   if visible of button "clearTape" = false then
  552.     show card button "clearTape"
  553.     show card button "saveTape"
  554.   else
  555.     hide card button "clearTape"
  556.     hide card button "saveTape"
  557.   end if
  558. end mouseUp
  559.  
  560.  
  561. -- part 42 (button)
  562. -- low flags: 00
  563. -- high flags: 0000
  564. -- rect: left=287 top=154 right=198 bottom=344
  565. -- title width / last selected line: 0
  566. -- icon id / first selected line: 0 / 0
  567. -- text alignment: 1
  568. -- font id: 0
  569. -- text size: 12
  570. -- style flags: 0
  571. -- line height: 16
  572. -- part name: about
  573. ----- HyperTalk script -----
  574. on mouseUp
  575.   if visible of card field "about" is false then
  576.     show card field "about"
  577.     play "Harpsichord" tempo 380 "b3 c#4 d e f# g a#3 g4 f# e d c# d r f# r b r c# r b r a# r bw"
  578.   else
  579.     hide card field "about"
  580.   end if
  581. end mouseUp
  582.  
  583.  
  584.  
  585. -- part 45 (button)
  586. -- low flags: 00
  587. -- high flags: 2000
  588. -- rect: left=320 top=259 right=282 bottom=346
  589. -- title width / last selected line: 0
  590. -- icon id / first selected line: 0 / 0
  591. -- text alignment: 1
  592. -- font id: 0
  593. -- text size: 12
  594. -- style flags: 0
  595. -- line height: 16
  596. -- part name: help
  597. ----- HyperTalk script -----
  598. on mouseUp
  599.   go to card ID 5373
  600. end mouseUp
  601.  
  602.  
  603.  
  604. -- part 46 (field)
  605. -- low flags: 81
  606. -- high flags: 0004
  607. -- rect: left=5 top=24 right=227 bottom=306
  608. -- title width / last selected line: 0
  609. -- icon id / first selected line: 0 / 0
  610. -- text alignment: 0
  611. -- font id: 3
  612. -- text size: 9
  613. -- style flags: 0
  614. -- line height: 12
  615. -- part name: 
  616. ----- HyperTalk script -----
  617. on mouseUp
  618.   hide card field 6
  619. end mouseUp
  620.  
  621.  
  622. -- part 50 (button)
  623. -- low flags: 00
  624. -- high flags: A000
  625. -- rect: left=419 top=40 right=89 bottom=485
  626. -- title width / last selected line: 0
  627. -- icon id / first selected line: 27056 / 27056
  628. -- text alignment: 1
  629. -- font id: 0
  630. -- text size: 12
  631. -- style flags: 0
  632. -- line height: 16
  633. -- part name: oldTapes
  634. ----- HyperTalk script -----
  635. on mouseUp
  636.   visual dissolve slow to gray
  637.   go to card ID 4892
  638. end mouseUp
  639.  
  640.  
  641.  
  642. -- part 51 (field)
  643. -- low flags: 81
  644. -- high flags: 0004
  645. -- rect: left=6 top=19 right=222 bottom=307
  646. -- title width / last selected line: 0
  647. -- icon id / first selected line: 0 / 0
  648. -- text alignment: 0
  649. -- font id: 3
  650. -- text size: 9
  651. -- style flags: 0
  652. -- line height: 12
  653. -- part name: about
  654. ----- HyperTalk script -----
  655. on mouseUp
  656.   hide card field "about"
  657. end mouseUp
  658.  
  659.  
  660. -- part 54 (button)
  661. -- low flags: 00
  662. -- high flags: 8000
  663. -- rect: left=337 top=83 right=138 bottom=401
  664. -- title width / last selected line: 0
  665. -- icon id / first selected line: 11228 / 11228
  666. -- text alignment: 1
  667. -- font id: 0
  668. -- text size: 12
  669. -- style flags: 0
  670. -- line height: 16
  671. -- part name: pCalc V0.7
  672. ----- HyperTalk script -----
  673. on mouseUp
  674.   go to pCalc V0.7
  675. end mouseUp
  676.  
  677.  
  678.  
  679. -- part 58 (field)
  680. -- low flags: 81
  681. -- high flags: 6004
  682. -- rect: left=66 top=64 right=242 bottom=454
  683. -- title width / last selected line: 0
  684. -- icon id / first selected line: 0 / 0
  685. -- text alignment: 0
  686. -- font id: 3
  687. -- text size: 9
  688. -- style flags: 0
  689. -- line height: 12
  690. -- part name: howCome
  691. ----- HyperTalk script -----
  692. on mouseUp
  693.   hide card field 6
  694. end mouseUp
  695.  
  696.  
  697. -- part contents for card part 46
  698. ----- text -----
  699.  
  700.         pCalc, a paper tape calculator, is this authors' first stackware effort.
  701.         pCalc will function as a traditional calculator for the four common math operators:
  702.         '+' (plus), '-' (minus), '*' (multiply) and '/' (divide).
  703. A calculator isn't really much more than a programmer's exercise under HyperCard due to the excellant math 'abilities' inherent in the 'Message Box'.  To make this stackware more useful and in keeping with HyperCard's information handling nature, I've added the ability to generate 'paper tape' records during a pCalc session.  If desired, these tapes may be 'filed' for later retrieval.
  704.  
  705. Charles M. Davis
  706. 15SEP87 (V 0.6)
  707.  
  708. -- part contents for card part 51
  709. ----- text -----
  710.  
  711.         pCalc, a paper tape calculator, is this authors' first stackware effort.
  712.         pCalc will function as a traditional calculator for the four common math operators:
  713.         '+' (plus), '-' (minus), '*' (multiply) and '/' (divide).
  714. A calculator isn't really much more than a programmer's exercise under HyperCard due to the excellant math 'abilities' inherent in the 'Message Box'.  To make this stackware more useful and in keeping with HyperCard's information handling nature, I've added the ability to generate 'paper tape' records during a pCalc session.  If desired, these tapes may be 'filed' for later retrieval.
  715.  
  716. Charles M. Davis
  717. 17SEP87 (V 0.7)
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. -- part contents for card part 58
  731. ----- text -----
  732.                                                   How come?
  733. ΓÇó mouse-driven entry seems slow in this stack,
  734. ΓÇó the only book that I can find on HyperCard seems to be missing things (where's the information on lockMessage?), and
  735. ΓÇó folks don't always compact stacks and pack them before they upload.
  736.  
  737. Sharing information is what HyperCard should be all about.  That's exciting!!  I'd really like to see what some of you can do to the 'inside' of pCalc to improve it.  Just, please, leave my name in it -- somewhere.
  738.  
  739.                                                                      Thanks!!!
  740.                                                                            Charlie Davis
  741.                                                                            (17SEP87)
  742.  
  743.  
  744.  
  745. -- part contents for card part 19
  746. ----- text -----
  747. 0